from glob import glob


filelist = [ i.split(".as")[0] for i in glob( "*.as" ) if i.find("ListOf") == -1 and i != "FunctionNode.as"]

arraystring = '"'

arraystring += '",\n \t\t"'.join( filelist )

print arraystring

outfile = open("ListOfNodes.as", "w" )

outfile.write("""
/**
 * @author pbalogh
 */
class functionnodes.ListOfNodes {
	
	
	
	public static var LIST = [ 
		""")

outfile.write( arraystring )

outfile.write( """\"];

public function ListOfNodes()
	{
		var fn:Function;
""")

outfile.write( "".join( [ "\t\tfn = functionnodes." + i + ";\n" for i in filelist] ) )

outfile.write( """
	}
}
""")

outfile.close()


